package a.f.h.a.b;

import a.a.fb;
import a.c.ab;
import a.c.d;
import a.f.h.a.a.g;
import a.f.h.a.a.o;

public class n
  extends m
{
  private a.c.e k;
  private a.c.e l;
  private ab n;
  private a.c.n p = this.c.C();
  public static final int q = 0;
  public static final int r = 1;
  public static final int s = 2;
  public static final int t = 3;
  public static final int u = 4;
  public static int v;
  
  public n(b paramb)
  {
    super(paramb);
    b();
    this.k = this.c.i();
    this.l = this.c.i();
    this.n = new ab();
  }
  
  public void a()
  {
    c();
    this.c.a(this.k);
    this.c.a(this.l);
    this.c.a(this.p);
    super.a();
  }
  
  public ab a(a.c.e parame1, a.c.e parame2)
  {
    ab localab = null;
    c();
    c(parame1, parame2);
    localab = fb.a(this.c, this.k, this.l, true, fb.a(this.c));
    return localab;
  }
  
  public double a(a.c.e parame1, a.c.e parame2, ab paramab1, ab paramab2)
  {
    int i = b.h;
    c();
    c(parame1, parame2);
    double[] arrayOfDouble = fb.a(this.c);
    Object localObject = paramab1.l();
    do
    {
      if (!((a.c.m)localObject).e()) {
        break;
      }
      d locald1 = ((a.c.m)localObject).a();
      if (i != 0) {
        break label84;
      }
      d locald2 = c(locald1);
      arrayOfDouble[locald2.d()] = 0.0D;
      ((a.c.m)localObject).f();
    } while (i == 0);
    label84:
    localObject = new d[this.c.j()];
    double d = fb.a(this.c, this.k, this.l, true, arrayOfDouble, (d[])localObject);
    paramab2.addAll(fb.b(this.k, this.l, (d[])localObject));
    return d;
  }
  
  public double a(d paramd, ab paramab)
  {
    int i = b.h;
    ab localab = this.a.d(paramd);
    c();
    c(paramd.e(), paramd.f());
    double[] arrayOfDouble = fb.a(this.c);
    Object localObject = localab.l();
    do
    {
      if (!((a.c.m)localObject).e()) {
        break;
      }
      d locald1 = ((a.c.m)localObject).a();
      if (i != 0) {
        break label99;
      }
      d locald2 = c(locald1);
      arrayOfDouble[locald2.d()] = 0.0D;
      ((a.c.m)localObject).f();
    } while (i == 0);
    label99:
    localObject = new d[this.c.j()];
    double d = fb.a(this.c, this.k, this.l, true, arrayOfDouble, (d[])localObject);
    paramab.addAll(fb.b(this.k, this.l, (d[])localObject));
    return d;
  }
  
  private void c(a.c.e parame1, a.c.e parame2)
  {
    boolean bool = b.i;
    int i = b.h;
    Object localObject1 = this.a.a(parame1).l();
    d locald;
    do
    {
      do
      {
        if (!((a.c.m)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.m)localObject1).a();
        localObject3 = a(this.a.b((d)localObject2));
        locald = this.c.a(this.k, (a.c.e)localObject3);
        a(locald, 0);
        b(locald);
        ((a.c.m)localObject1).f();
        if (bool) {
          break label126;
        }
        if (i != 0) {
          break label120;
        }
      } while (i == 0);
    } while (bool);
    localObject1 = this.a.a(parame2).l();
    label120:
    label126:
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      localObject3 = a(this.a.b((d)localObject2));
      locald = this.c.a((a.c.e)localObject3, this.l);
      a(locald, 1);
      if (!bool)
      {
        if (i != 0) {
          break label202;
        }
        b(locald);
        ((a.c.m)localObject1).f();
      }
    } while (i == 0);
    label202:
    localObject1 = this.d.a(parame1);
    Object localObject2 = this.d.a(parame2);
    Object localObject3 = o.d((a.f.h.a.a.e)localObject1, (a.f.h.a.a.e)localObject2);
    localObject1 = ((a.f.h.a.a.e)localObject1).a();
    do
    {
      do
      {
        if (localObject1 == localObject3) {
          break;
        }
        a(((g)localObject1).e(), 3);
        if (bool) {
          break label291;
        }
        localObject1 = ((a.f.h.a.a.e)localObject1).a();
        if (i != 0) {
          break label289;
        }
      } while (i == 0);
    } while (bool);
    localObject2 = ((a.f.h.a.a.e)localObject2).a();
    label289:
    label291:
    do
    {
      while (i == 0)
      {
        if (localObject2 == localObject3) {
          break;
        }
        a(((g)localObject2).e(), 4);
        localObject2 = ((a.f.h.a.a.e)localObject2).a();
      }
    } while (bool);
  }
  
  public void a(a.c.e parame, int paramInt)
  {
    boolean bool = b.i;
    int i = b.h;
    ab localab = this.a.b(parame);
    a.c.m localm = localab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald1 = localm.a();
      a.f.j.n localn1 = this.a.b(locald1);
      a.c.e locale1 = a(localn1);
      d locald2 = this.a.i(locald1);
      if ((bool) || (locald2.e() == parame)) {
        locald2 = this.a.c(locald2);
      }
      a.f.j.n localn2 = this.a.b(locald2);
      a.c.e locale2 = a(localn2);
      d locald3;
      if (paramInt == 3)
      {
        locald3 = this.c.a(locale1, locale2);
        a(locald3, parame);
        a(locald3, 3);
        b(locald3);
        if (bool) {
          continue;
        }
        if (i == 0) {}
      }
      else
      {
        locald3 = this.c.a(locale2, locale1);
        a(locald3, parame);
        a(locald3, 4);
        b(locald3);
      }
      localm.f();
    } while (i == 0);
  }
  
  private void c()
  {
    boolean bool = b.i;
    int i = b.h;
    a.c.m localm = this.n.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      if (i != 0) {
        break label77;
      }
      if (!bool)
      {
        if (this.c.j(localm.a())) {
          this.c.a(localm.a());
        }
        localm.f();
      }
    } while (i == 0);
    if (!bool) {
      label77:
      this.n.clear();
    }
  }
  
  private void b(d paramd)
  {
    this.n.add(paramd);
  }
  
  public void a(a.f.j.n paramn, a.f.j.n[] paramArrayOfn)
  {
    boolean bool = b.i;
    int m = b.h;
    a.c.e locale1 = a(paramn);
    a.c.m localm = paramn.a();
    Object localObject1;
    Object localObject2;
    Object localObject3;
    Object localObject4;
    do
    {
      if (!localm.e()) {
        break;
      }
      localObject1 = localm.a();
      localObject2 = this.a.c((d)localObject1);
      localObject3 = c((d)localObject1);
      localObject4 = c((d)localObject2);
      if (m != 0) {
        break label141;
      }
      if (this.c.j((d)localObject3)) {
        this.c.a((d)localObject3);
      }
      if (!bool)
      {
        if (this.c.j((d)localObject4)) {
          this.c.a((d)localObject4);
        }
        localm.f();
      }
    } while (m == 0);
    this.c.a(locale1);
    label141:
    int i = 0;
    do
    {
      if (i >= paramArrayOfn.length) {
        break;
      }
      localObject1 = paramArrayOfn[i];
      if (bool) {
        break label195;
      }
      localObject2 = this.c.i();
      if (m != 0) {
        break label192;
      }
      a((a.f.j.n)localObject1, (a.c.e)localObject2);
      i++;
    } while (m == 0);
    label192:
    label195:
    boolean[] arrayOfBoolean = new boolean[this.b.l()];
    int j = 0;
    label370:
    do
    {
      if (j >= paramArrayOfn.length) {
        break;
      }
      localObject2 = paramArrayOfn[j];
      localObject3 = a((a.f.j.n)localObject2);
      localObject4 = ((a.f.j.n)localObject2).a();
      do
      {
        do
        {
          if (!((a.c.m)localObject4).e()) {
            break label370;
          }
          d locald1 = ((a.c.m)localObject4).a();
          d locald2 = this.a.c(locald1);
          a.f.j.n localn = this.a.b(locald2);
          a.c.e locale2 = a(localn);
          if (m != 0) {
            break;
          }
          if (arrayOfBoolean[locald1.d()] == 0)
          {
            d locald3 = this.c.a((a.c.e)localObject3, locale2);
            a(locald1, locald3);
            arrayOfBoolean[locald1.d()] = true;
            d locald4 = this.c.a(locale2, (a.c.e)localObject3);
            a(locald2, locald4);
            arrayOfBoolean[locald2.d()] = true;
          }
          ((a.c.m)localObject4).f();
        } while (m == 0);
        j++;
      } while (bool);
    } while (m == 0);
  }
  
  public void a(d paramd, int paramInt)
  {
    g(paramd).a = paramInt;
  }
  
  public int d(d paramd)
  {
    if (!b.i) {
      if (a(paramd) != null) {
        return 2;
      }
    }
    return g(paramd).a;
  }
  
  public void a(d paramd, a.c.e parame)
  {
    g(paramd).b = parame;
  }
  
  public a.c.e e(d paramd)
  {
    return g(paramd).b;
  }
  
  public d f(d paramd)
  {
    return a(paramd);
  }
  
  private a_ g(d paramd)
  {
    a_ locala_ = (a_)this.p.get(paramd);
    if (!b.i) {
      if (locala_ == null)
      {
        locala_ = d();
        this.p.a(paramd, locala_);
      }
    }
    return locala_;
  }
  
  private a_ d()
  {
    return new a_(null);
  }
  
  private static class a_
  {
    int a;
    a.c.e b;
    
    private a_() {}
    
    a_(n.1 param1)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.a.b.n

 * JD-Core Version:    0.7.0.1

 */